<?php
$result = mysql_query("SELECT * FROM user WHERE id = ".$_SESSION['user']);
$row = mysql_fetch_array($result);

$user = $_SESSION['user'];
$email = $row['paypal'];
$type = $row['type'];
$access = $row['type'];
$username = $row['username'];
$duo_approved = $row['duo_approved'];
?>

<script src="js/bootstrap.min.js"></script>
<body data-color="grey" >
<style>
    table td{
        vertical-align: middle !important;
    }
</style>
		<div id="wrapper">
			<div id="header" style="margin-top: -10px">
				<h1><a href="/">Elo Coach Boosting</a></h1>
				<a id="menu-trigger" href="#"><i class="fa fa-bars"></i></a>
			</div>

			<div id="user-nav" style="right: 20px;top: 10px">
            <ul class="btn-group">
	                <li class="" ><a title="" href="#"><i class="fa fa-user"></i> <span class="text">Profile - <?php echo $username; ?></span></a></li>

	                <li class=""><a title="Settings" href="settings.php"><i class="fa fa-gears"></i> <span class="text">Settings</span></a></li>
	                <li class=""><a title="Logout" href="logout.php"><i class="fa fa-share"></i> <span class="text">Logout</span></a></li>
	            </ul>
	        </div>
	       
	     <!--  <div id="switcher">
	            <div id="switcher-inner">
	                <h3>Theme Options</h3>
	                <h4>Colors</h4>
	                <p id="color-style">
	                    <a data-color="orange" title="Orange" class="button-square orange-switcher" href="#"></a>
	                    <a data-color="turquoise" title="Turquoise" class="button-square turquoise-switcher" href="#"></a>
	                    <a data-color="blue" title="Blue" class="button-square blue-switcher" href="#"></a>
	                    <a data-color="green" title="Green" class="button-square green-switcher" href="#"></a>
	                    <a data-color="red" title="Red" class="button-square red-switcher" href="#"></a>
	                    <a data-color="purple" title="Purple" class="button-square purple-switcher" href="#"></a>
	                    <a href="#" data-color="grey" title="Grey" class="button-square grey-switcher"></a>
	                </p>
	             
	                <h4 class="visible-lg">Layout Type</h4>
	                <p id="layout-type">
	                	<a data-option="flat" class="button" href="#">Flat</a>
	                    <a data-option="old" class="button" href="#">Old</a>                    
	                </p>
	            </div>
	            <div id="switcher-button">
	                <i class="fa fa-cogs"></i>
	            </div>
	        </div>    -->

			<div id="sidebar">
			<!--	<div id="search">
					<input type="text" placeholder="Search here..."/><button type="submit" class="tip-right" title="Search"><i class="fa fa-search"></i></button>
				</div>	 -->
				<ul>
					<li><a href="/orders"><i class="fa fa-home"></i> <span>Dashboard</span></a></li>
					<li class="active"><a href="http://www.veteranboosters.com/boost/"><i class="fa fa-tasks"></i> <span> Buy Boost</span></a></li>
					 <?php
			if($type == 1 || $type == 2 || $type == 3)
			{
		?>
		<li <?php if($_SERVER["PHP_SELF"] == "/track/tickets.php") echo "class = 'active'"; ?>>
			<a href="tickets.php"><i class="fa fa-gears"></i> <span>Current Tickets</span></a>
		</li>	
		<?php
			}
		?>
		<li <?php if($_SERVER["PHP_SELF"] == "/orders/settings.php") echo "class = 'active'"; ?>>
			<a href="settings.php"><i class="fa fa-gears"></i> <span>Settings</span></a>
        </li>
		
		<?php
			if($type == 0 || $type == 1)
			{
		?>
			 <li <?php if($_SERVER["PHP_SELF"] == "/orders/tickets.php") echo "class = 'active'"; ?>>
				<a href="settings.php"><i class="fa fa-home"></i> <span>Current tickets</span></a>
			</li>
		<?php
			}
		?>
		
		<?php
	if($type == 1 || $type == 2)
	{
		echo '

        <li ';
		if($_SERVER["PHP_SELF"] == "/orders/booster.php") echo "class = 'active'";
		echo '>
			<a href="booster.php"><i class="fa fa-folder-open"></i> <span>Boosters Panel</span></a>
        </li>
            
                ';

		echo '<li ';
		if($_SERVER["PHP_SELF"] == "/orders/payouts.php") echo "class = 'active'"; 
		echo '>
			<a href="payouts.php"><i class="fa fa-money"></i> <span>Payouts</span></a>
	
         </li>';
	}
	?>
	
		<?php
		if($type == 2)
		{

			echo '
			<li class="submenu">
						<a href="#kdbaBFDPsQA"><i class="fa fa-flask"></i> <span>Admin Panel</span> <i class="arrow fa fa-chevron-right"></i></a>
			<ul id="kdbaBFDPsQA">
				<li ';if($_SERVER["PHP_SELF"] == "/orders/orders-admin.php") echo "class = 'active'"; 
				echo '><a href="orders-admin.php">Orders</a></li>
							<li ';
				if($_SERVER["PHP_SELF"] == "/orders/edit-user.php") echo "class = 'active'"; 
				echo '><a href="edit-user.php">User Edit</a></li>
				
				<li ';if($_SERVER["PHP_SELF"] == "/orders/edit-booster.php") echo "class = 'active'"; 
				echo '><a href="edit-booster.php">Booster Edit</a></li>
					<li ';
				if($_SERVER["PHP_SELF"] == "/orders/verify-orders.php") echo "class = 'active'"; 
				echo '><a href="verify-orders.php">Verify order completion</a></li>
					<li ';
				if($_SERVER["PHP_SELF"] == "/orders/masspay.php") echo "class = 'active'"; 
				echo '><a href="masspay.php">Create masspay file</a></li>
					<li ';
				if($_SERVER["PHP_SELF"] == "/orders/view-masspays.php") echo "class = 'active'"; 
				echo '><a href="view-masspays.php">View past masspays</a></li>
					<li ';
				if($_SERVER["PHP_SELF"] == "/orders/admin-tickets.php") echo "class = 'active'"; 
				echo '><a href="admin-tickets.php">View tickets</a></li>
					<li ';
				if($_SERVER["PHP_SELF"] == "/orders/admin-settings.php") echo "class = 'active'"; 
				echo '><a href="admin-settings.php">Admin Setting</a></li>
					<li ';
				if($_SERVER["PHP_SELF"] == "/orders/admin-messages.php") echo "class = 'active'"; 
				echo '><a href="admin-messages.php">Site messages</a></li>
					<li ';
				if($_SERVER["PHP_SELF"] == "/orders/complete-orders.php") echo "class = 'active'"; 
				echo '><a href="complete-orders.php"> Completed orders</a></li>
					<li  ';
				if($_SERVER["PHP_SELF"] == "/orders/booster-applications.php") echo "class = 'active'"; 
				echo '><a href="booster-applications.php">Booster applications</a></li>
				<li

				</ul>
	</li>';
		}
		if($type == 3)
		{
			
				echo '<li ';
		if($_SERVER["PHP_SELF"] == "/track/referral_panel.php") echo "class = 'active'";
		echo '>
          <a href="referral_panel.php">
              <span>Referral Orders</span>
          </a>
        </li>';
		
		echo '<li ';
		if($_SERVER["PHP_SELF"] == "/track/leveling_panel.php") echo "class = 'active'";
		echo '>
          <a href="leveling_panel.php">
              <span>Leveling Orders</span>
          </a>
        </li>';
	
		
		echo '<li ';
		if($_SERVER["PHP_SELF"] == "/track/payouts.php") echo "class = 'active'";
		echo '>
                  <a href="payouts.php">
                      <i class="icon-money icon-2x"></i> <span>Payouts</span>
                  </a>
                </li>';
			echo '
		<li class="submenu">
						<a href="#kdbaBFDPsQA"><i class="fa fa-flask"></i> <span>Admin Panel</span> <i class="arrow fa fa-chevron-right"></i></a>

          <ul id="kdbaBFDPsQA">
            
                <li class="">
                  <a href="orders-admin.php">
                      <i class="icon-money"></i> ELO Orders
                  </a>
                </li>

				
				<li class="">
                  <a href="verify-orders.php">
                      <i class="icon-cog"></i> Verify order completion
                  </a>
                </li>

				<li class="">
                  <a href="admin-tickets.php">
                      <i class="icon-cog"></i> View Tickets
                  </a>
                </li>

				<li class="">
                  <a href="complete-orders.php">
                      <i class="icon-cog"></i> Completed Orders
                  </a>
                </li>
				
				<li class="">
                  <a href="edit-user.php">
                      <i class="icon-user"></i> User Edit
                  </a>
                </li>

				<li class="">
                  <a href="user-search.php">
                      <i class="icon-user"></i> User Search
                  </a>
                </li>
            
          </ul>

        </li>';
		}
		?>
		
</ul>
			
			</div>
			
			<div id="content" style="margin-top: 30px">
				<div id="content-header" class="mini">
					<h1>Dashboard</h1>
                    <!--
					<ul class="mini-stats box-3">
						<li>
							<div class="left sparkline_bar_good"><span>2,4,9,7,12,10,12</span>+10%</div>
							<div class="right">
								<strong>36094</strong>
								Visits
							</div>
						</li>
						<li>
							<div class="left sparkline_bar_neutral"><span>20,15,18,14,10,9,9,9</span>0%</div>
							<div class="right">
								<strong>1433</strong>
								Users
							</div>
						</li>
						<li>
							<div class="left sparkline_bar_bad"><span>3,5,9,7,12,20,10</span>+50%</div>
							<div class="right">
								<strong>8650</strong>
								Orders
							</div>
						</li>
					</ul>       -->
				</div>
				